#include "tan_codeobject.h"
#include "tan_alloc.h"

static TanObjectType tan_code_object_type =
{
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0,
	0
};

TanObject* Tan_Code(TanCodeDeclare decl, TanCodeExpr expr, 
	TanObject* name, TanObject* args,
	TAN_INT64 mode, TAN_INT64 cur_line,
	TanObject* jumpFuncString, TAN_INT64 jumpline, TAN_INT64 jumpindex)
{
	TanCodeObject* var_object = (TanCodeObject*)Tan_AllocObject_Memset(sizeof(TanCodeObject));

	var_object->var_decl = decl;
	var_object->var_expr = expr;
	var_object->var_name = name;
	var_object->var_args = args;
	var_object->var_mode = mode;
	var_object->var_curline = cur_line;
	var_object->var_jumptofuncstring = jumpFuncString;
	var_object->var_jumptoline = jumpline;
	var_object->var_jumptoindex = jumpindex;

	return var_object;
}
